import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Main from '@/components/Main'
import Home from '@/components/Home'
import CompanySearch from '@/components/company/CompanySearch'
import MyCompany from '@/components/company/MyCompany'
import Car from '@/components/car/Car'
import CarDistribution from '@/components/car/CarDistribution'
import HandoverSearch from '@/components/car/HandoverSearch.vue'
import CarCheck from '@/components/car/CarCheck'
import DepSearch from '@/components/dep/DepSearch'

import PositionSearch from '@/components/position/PositionSearch.vue'
import PermissionSearch from '@/components/permission/PermissionSearch.vue'
import StaffSearch from '@/components/staff/StaffSearch.vue'
import ClientSearch from '@/components/client/ClientSearch.vue'
import RoleSearch from '@/components/role/RoleSearch.vue'
import AreaSearch from '@/components/area/AreaSearch.vue'
import StationSearch from '@/components/station/StationSearch.vue'
import DriverSearch from '@/components/driver/DriverSearch.vue'
import CouponSearch from '@/components/coupon/CouponSearch.vue'
import DeviceSearch from '@/components/device/DeviceSearch.vue'
import BatterySearch from '@/components/battery/BatterySearch.vue'
import WorkForm from '@/components/workform/WorkFormSearch.vue'
import WorkformNextStep from '@/components/workform/WorkformNextStep.vue'
import Order from '@/components/order/OrderSearch.vue'
import ProductSearch from '@/components/product/ProductSearch.vue'
import ChargerSearch from '@/components/charger/ChargerSearch.vue'


import CrmPassengerSearch from '@/components/crmpassenger/CrmPassengerSearch.vue'
import MyFindPageAll from '@/components/crmpassenger/MyFindPageAll.vue'
import CrmContractFindAllOrPage from '@/components/crmpurchasecontract/CrmContractSearch.vue';
import CrmPurchaseContract from '@/components/crmpurchasecontract/CrmPurchaseContract.vue'
import ActivitySearch from '@/components/activity/ActivitySearch.vue'




import UnApprovedList from '@/components/vehicle/UnApprovedList.vue'
import VehicleList from '@/components/vehicle/VehicleList.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
	},
    {
      path: '/Main',
      name: 'Main',
      component: Main,
      redirect:"Home",
      children:[{
      	path:'/Home',
      	name:'Home',
      	component:Home
      },
      {
      	path:'/sysEnterprise/findPage',
      	name:'CompanySearch',
      	component:CompanySearch
      },
      {
      	path:'/MyCompany',
      	name:'MyCompany',
      	component:MyCompany
      },
      // {
      // 	path:'/vehicle/vehicleList',
      // 	name:'Car',
      // 	component:Car
      // },
	  {
	  	path:'/vehicleStatistics/findRealTimeRoute',
	  	name:'CarDistribution',
	  	component:CarDistribution
	  },
      {
      	path:'/vehicle/verifyPass',
      	name:'CarCheck',
      	component:CarCheck
      },{
      	path:'/sysDept/findPage',
      	name:'DepSearch',
      	component:DepSearch
      },{
      	path:'/sysPosition/findPage',
      	name:'PositionSearch',
      	component:PositionSearch
      },{
      	path:'/permission/findPage',
      	name:'PermissionSearch',
      	component:PermissionSearch
      },{
      	path:'/sysStaff/findPage',
      	name:'StaffSearch',
      	component:StaffSearch
      },{
      	path:'/sysClient/findPage',
      	name:'ClientSearch',
      	component:ClientSearch
      },{
      	path:'/sysRole/findPage',
      	name:'RoleSearch',
      	component:RoleSearch
      },{
      	path:'/sysProvince/findPage',
      	name:'AreaSearch',
      	component:AreaSearch
      },{
      	path:'/station/findPage',
      	name:'StationSearch',
      	component:StationSearch
      },{
      	path:'/consumerUser/findPage',
      	name:'DriverSearch',
      	component:DriverSearch
      },{
      	path:'/coupon/findPage',
      	name:'CouponSearch',
      	component:CouponSearch
      },{
      	path:'/equipment/findPage',
      	name:'DeviceSearch',
      	component:DeviceSearch
      },{
      	path:'/battery/findPage',
      	name:'BatterySearch',
		component:BatterySearch
      },{
      	path:'/workform/findPage',
      	name:'WorkForm',
      	component:WorkForm
      },{
      	path:'/workform/nextStep',
      	name:'WorkformNextStep',
      	component:WorkformNextStep
      },
	  {
	  	path:'/handover/findPage',
	  	name:'HandoverSearch',
	  	component:HandoverSearch
	  },
	  {
	  	path:'/order/findPage',
	  	name:'Order',
	  	component:Order
	  },
	  {
	  	path:'/crmPassenger/findPageAll',
	  	name:'CrmPassengerSearch',
	  	component:CrmPassengerSearch
	  },
	  {
	  	path:'/crmPassenger/myFindPageAll',
	  	name:'MyFindPageAll',
	  	component:MyFindPageAll
	  },
	  {
	  	path:'/vehicle/unApprovedList',
	  	name:'UnApprovedList',
	  	component:UnApprovedList
	  },
	  {
	  	path:'/vehicle/vehicleList',
	  	name:'VehicleList',
	  	component:VehicleList
	  },
	  {
		path:'/product/findPage',
		name:'ProductSearch',
		component:ProductSearch
	  },
	  {
		path:'/charger/findPage',
		name:'ChargerSearch',
		component:ChargerSearch
	  },
	  {
		path:'/crmpurchasecontract/findAllOrPage',
		name:'CrmContractFindAllOrPage',
		component:CrmContractFindAllOrPage
	  },
	  {
		path:'/crmpurchasecontract/findSysUserIdAllOrPage',
		name:'CrmPurchaseContract',
		component:CrmPurchaseContract
	  },
	  {
		path:'/activity/findPage',
		name:'ActivitySearch',
		component:ActivitySearch
	  },
      ]
    }
  ]
})
